
import regeneratorRuntime from "@babel/runtime/regenerator";
export default {
    data: {
        title: ""
    },
    onInit() {
        this.title = this.$t('strings.world');
    },
    openCameraAbility(){
        let content = {
            code: 1001,
            data: {
                table: "mnote",
                values: {
                    filterkey: "all",
                    filtervalue: "",
                },
            },
        };
        this.connectJava(content);
    },
    async connectJava(content) {
        let messageCode = content.code;
        let ability_action = {
            bundleName: "com.dweb.jiugongzi",
            abilityName: "com.dweb.jiugongzi.service.JsToJava",
            messageCode: messageCode,
            abilityType: 0,
            data: content.data,
            syncOption: 0,
        };
        let ret = await FeatureAbility.callAbility(ability_action);
        console.info(ret);
        ret = JSON.parse(ret);

        switch (ret.code) {
            case 1001:
                console.info(ret.code);
                console.info(ret.msg);
                console.info(ret.data);
                break;

            default:
                console.error(ret.code);
                break;
        }
    },

}
